<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="UTF-8">
<title>Course Selection</title>
</head>
<body>
	<form method="post" th:action="@{/show}">
	<table>
	<thead>
	<tr>
	<th>序号</th>
	<th>课程名</th>
	<th>选课</th>
	<tr>
	</thead>
	<tbody>
	<tr th:each="course:${course}">
	<td th:text="${course.id}">nothing here</td>  
    <td th:text="${course.name}">nothing here</td>
    <td><label><input type="checkbox" name="select" th:value="${course.name}"></label></td>
    </tr>
	</tbody>
	<tfoot align="center">
	<tr><td colspan='3'><input id="sub" name="sub" type="submit" value="完成提交" /></td></tr>
	</tfoot>
	</table>
		<!-- 从上个页面继承的数据，用type="hidden"设为不显示 -->
		<p><input id="name" name="name" type="hidden" th:value="${pInfo.name}" ></p>
		<p><input id="sid" name="sid" type="hidden" th:value="${pInfo.sid}" ></p>
		<p><input id="major" name="major" type="hidden" th:value="${pInfo.major}"></p>
		<p><input id="grade" name="grade" type="hidden" th:value="${pInfo.grade}"></p>
		<p><input id="colleage" name="colleage" type="hidden" th:value="${pInfo.colleage}"></p>
	</form>	
</body>
</html>